package com.example.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.common.utils.PageUtils;
import com.example.product.entity.AttrAttrgroupRelationEntity;
import com.example.product.entity.AttrEntity;
import com.example.product.entity.AttrGroupEntity;
import com.example.product.vo.AttrGroupWithAttrRespVo;

import java.util.List;
import java.util.Map;

/**
 * 属性分组
 *
 * @author cheval
 * @email chevalyang@163.com
 * @date 2022-12-28 23:23:09
 */
public interface AttrGroupService extends IService<AttrGroupEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 分页查询
     * @param params
     * @param catId
     * @return
     */
    PageUtils queryPage(Map<String, Object> params, Long catId);

    /**
     * 根据分组id查询分组关联的属性
     * @param attrGroupId
     * @return
     */
    List<AttrEntity> queryAttrGroupRelationAttrs(Long attrGroupId);

    /**
     * 批量删除分组关联的属性
     * @param entities
     */
    void removeAttrGroupRelationAttr(AttrAttrgroupRelationEntity[] entities);


    /**
     * 查询分类下的所有属性组以及属性组关联的属性
     * @param catelogId
     * @return
     */
    List<AttrGroupWithAttrRespVo> getAttrGroupWithAttrs(Long catelogId);
}

